Rails.application.routes.draw do
  resources :posts
  get 'comments/creat'

  get 'comments/destroy'

  resources :posts do  
    resources :comments  
  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
 root 'posts#index'

end